import 'package:flutter_worker730/constants/index.dart';
import 'package:flutter_worker730/utils/RequestDio.dart';

Future<dynamic> getHouseListAPI() => requestDio.get(HTTP_PATH.HOUSE_LIST);
// 封装一个新增房屋的api接口函数
Future<dynamic> addHouseAPI(data) =>
    requestDio.post(HTTP_PATH.HOUSE_LIST, data: data);

//页面路由接口
Future<dynamic> getHouseDetailAPI(id) =>
    requestDio.get('${HTTP_PATH.HOUSE_LIST}/$id');
//删除房屋
Future<dynamic> delHouseAPI(id) =>
    requestDio.delete('${HTTP_PATH.HOUSE_LIST}/$id');
